<%@page import="java.util.Map"%>
<%@page import="java.util.HashMap"%>
<%@page import="com.erp.po.Admin"%>
<%@page import="java.util.ArrayList"%>
<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>

<%
	int current = 2;
	pageContext.setAttribute("i", current);
	
	ArrayList<String> list = new ArrayList<String>();
	list.add("aaa");
	list.add("bbb");
	list.add("ccc");
	pageContext.setAttribute("list", list);
	
	Admin amdin = new Admin();
	
	Map<String,Admin> map = new HashMap<String,Admin>();
	
	map.put("one", new Admin("aaa","123"));
	map.put("two", new Admin("bbb","123"));
	map.put("three", new Admin("ccc","123"));
	
	pageContext.setAttribute("map", map);
	
%>

</head>
<body>

	<c:if test="${i == 1}">
		<a>下一页</a>
	</c:if>
	<c:if test="${i > 1}">
		<a href="http://www.baidu.com">去百度</a>
	</c:if>
	<hr />

	<c:forEach items="${list}" var="l">
		<p>${l}</p>
	</c:forEach>

	<hr />
	<c:forEach items="${map}" var="m">
		<p>Key: ${m.key} ----> value: ${m.value.adminName}</p>
	</c:forEach>


</body>
</html>